﻿using System;
using System.Net.Mail;
using System.Linq;
using System.Threading.Tasks;
using System.Collections.Generic;

namespace MiniSched.Email.Abstractions {

    internal class SmtpClientAbstraction {

        private SmtpClient SmtpClient {
            get { return _SmtpClient ?? (_SmtpClient = new SmtpClient()); }
        }
        private SmtpClient _SmtpClient;

        public virtual Task SendMailAsync(MailMessage message) {
            return SmtpClient.SendMailAsync(message);
        }

        public virtual void Send(MailMessage message) {
            SmtpClient.Send(message);
        }
    }
}
